package com.tsingteng.cosfun.ui.message.comment.model;

import com.tsingteng.cosfun.bean.CenterThreeNotification;
import com.tsingteng.cosfun.bean.PlayDetailsBean;
import com.tsingteng.cosfun.callback.RxObserver;
import com.tsingteng.cosfun.common.Config;
import com.tsingteng.cosfun.http.RxSchedulers;
import com.tsingteng.cosfun.mvp.module.BaseModel;

public class OtherModel extends BaseModel implements IOtherModel {
    @Override
    public void getOfficalNotification(String type, int page,  RxObserver<CenterThreeNotification> callback) {
        doRxRequest().getCenterThreeNotification(type,page, Config.PAGE_SIZE).compose(RxSchedulers.io_main()).subscribe(callback);
    }

    @Override
    public void getIsRead(String funType, int maxid, RxObserver<Integer> rxObserver) {
        doRxRequest().getReadReslt(funType,maxid).compose(RxSchedulers.io_main()).subscribe(rxObserver);
    }

    /**
     * 便当详情

     * @param paragraphId
     * @param callback
     */
    @Override
    public void getPlayDetails( String paragraphId, RxObserver<PlayDetailsBean> callback) {
        doRxRequest().getPlayDetails(paragraphId).compose(RxSchedulers.io_main()).subscribe(callback);
    }
}
